<template>
  <div>
    <component :is="curPage" />
  </div>
</template>
<script>
import ManuPage from '@/views/ManuPage/views/MainList'
import ExaminerPage from '@/views/ExaminerPage/views/MainList'
import BuyerPage from '@/views/BuyerPage/views/MainList'
import ConsumerPage from '@/views/ConsumerPage/views/OverView'

export default {
  components: { ManuPage, ExaminerPage, BuyerPage, ConsumerPage },
  data () {
    const userName = this.$store.state.app.userName
    return {
      userName,
      curPage: 'ManuPage',
      columns: [

      ],
      tableData: []
    }
  },
  created () {
    this.render()
  },
  methods: {
    render () {
      switch (this.userName) {
        case 'examiner':
          this.curPage = 'ExaminerPage'
          break
        case 'buyer':
          this.curPage = 'BuyerPage'
          break
        case 'consumer':
          this.curPage = 'ConsumerPage'
          break
        default:
          this.curPage = 'ManuPage'
      }
    }
  }
}
</script>
<style lang="scss">

</style>
